<?php

namespace App\Services\User;

class UserUuidService
{
    public static function encode(string $id): string
    {
        $uuid = $id;

        return str_pad($uuid, 7, '0', STR_PAD_LEFT);
    }

    public static function decode(string $uuid): string
    {
        $id = intval($uuid);
        if ($id < 0) $id = 0;

        return $id;
    }
}
